<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>100天恋爱纪念</title>
                <style>
                        /* 新增情话样式 */
                                .love-msg {
                                                position: fixed;
                                                            font-size: 18px;
                                                                        color: #ff6b8b;
                                                                                    text-shadow: 1px 1px 3px rgba(255,255,255,0.8);
                                                                                                font-weight: bold;
                                                                                                            animation: floatMsg 8s linear forwards;
                                                                                                                        pointer-events: none;
                                                                                                                                    z-index: 90;
                                                                                                                                                white-space: nowrap;
                                }
                                        @keyframes floatMsg {
                                                        0% { transform: translate(0,100vh) rotate(0deg); opacity: 1; }
                                                                    100% { transform: translate(var(--tx), -100px) rotate(var(--r)); opacity: 0; }
                                        }
                                                
                                                        /* 底部情话栏 */
                                                                .msg-bar {
                                                                                background: rgba(255,255,255,0.7);
                                                                                            border-radius: 50px;
                                                                                                        padding: 10px 20px;
                                                                                                                    margin: 20px auto;
                                                                                                                                max-width: 80%;
                                                                                                                                            font-style: italic;
                                                                                                                                                        transition: all 0.5s;
                                                                }
                                                                    </style>
                                                                    </head>
                                                                    <body>
                                                                        <!-- 在原有代码基础上新增以下元素 -->
                                                                            <div class="msg-bar" id="msgBar">遇见你是最美的意外</div>

                                                                                <script>
                                                                                        // 浪漫情话库
                                                                                                const loveMessages = [
                                                                                                                "你的笑容是我的阳光",
                                                                                                                            "每一天都比昨天更爱你",
                                                                                                                                        "余生请多指教",
                                                                                                                                                    "你是我最想留住的幸运",
                                                                                                                                                                "心跳多久，爱你多久",
                                                                                                                                                                            "酸甜苦辣，与你共享",
                                                                                                                                                                                        "三生有幸，与你相遇",
                                                                                                                                                                                                    "执子之手，与子偕老"
                                                                                                ];

                                                                                                        // 底部情话轮播
                                                                                                                let msgIndex = 0;
                                                                                                                        function rotateMessage() {
                                                                                                                                        document.getElementById('msgBar').textContent = loveMessages[msgIndex];
                                                                                                                                                    msgIndex = (msgIndex + 1) % loveMessages.length;
                                                                                                                        }
                                                                                                                                setInterval(rotateMessage, 30000);

                                                                                                                                        // 随机情话特效
                                                                                                                                                function createLoveMsg(x, y) {
                                                                                                                                                                const msg = document.createElement('div');
                                                                                                                                                                            msg.className = 'love-msg';
                                                                                                                                                                                        msg.textContent = loveMessages[Math.floor(Math.random()*loveMessages.length)];
                                                                                                                                                                                                    msg.style.left = x + 'px';
                                                                                                                                                                                                                msg.style.top = y + 'px';
                                                                                                                                                                                                                            msg.style.setProperty('--tx', Math.random() * 200 - 100 + 'px');
                                                                                                                                                                                                                                        msg.style.setProperty('--r', Math.random() * 30 - 15 + 'deg');
                                                                                                                                                                                                                                                    msg.style.fontSize = Math.random() * 10 + 16 + 'px';
                                                                                                                                                                                                                                                                document.body.appendChild(msg);
                                                                                                                                                                                                                                                                            setTimeout(() => msg.remove(), 8000);
                                                                                                                                                }

                                                                                                                                                        // 点击触发情话
                                                                                                                                                                document.addEventListener('click', function(e) {
                                                                                                                                                                                createLoveMsg(e.clientX, e.clientY);
                                                                                                                                                                });

                                                                                                                                                                        // 自动漂浮情话
                                                                                                                                                                                setInterval(() => {
                                                                                                                                                                                                createLoveMsg(
                                                                                                                                                                                                                    Math.random() * window.innerWidth,
                                                                                                                                                                                                                                    window.innerHeight + 50
                                                                                                                                                                                                );
                                                                                                                                                                                }, 5000);
                                                                                                                                                                                    </script>
                                                                                                                                                                                    </body>
                                                                                                                                                                                    </html>
                                                                                                                                                                                                )
                                                                                                                                                                                })
                                                                                                                                                                })
                                                                                                                                                }
                                                                                                                        }
                                                                                                ]
                                                                }
                                        }
                                }